import request from '@/utils/request'

// 查询设备列表
export function listCamera(query) {
  return request({
    url: '/equipment/camera/list',
    method: 'get',
    params: query
  })
}

// 查询设备详细
export function getCamera(cameraId) {
  return request({
    url: '/equipment/camera/' + cameraId,
    method: 'get'
  })
}

// 新增设备
export function addCamera(data) {
  return request({
    url: '/equipment/camera',
    method: 'post',
    data: data
  })
}

// 修改设备
export function updateCamera(data) {
  return request({
    url: '/equipment/camera',
    method: 'put',
    data: data
  })
}

// 删除设备
export function delCamera(cameraIds) {
  return request({
    url: '/equipment/camera/' + cameraIds,
    method: 'delete'
  })
}

// 修改绑定信息
export function updateSmallCold(data) {
  return request({
    url: '/equipment/camera/updateSmallCold',
    method: 'put',
    data: data
  })
}

// 删除车辆信息
export function delBound(data) {
  return request({
    url: '/equipment/camera/delBound',
    method: 'put',
    data: data
  })
}

//查询车辆信息
export function listSmallCold(query) {
  return request({
    url: '/equipment/camera/select',
    method: 'get',
    params: query
  })
}
// export function getBoundCold(query) {
//   return request({
//     url: '/storage/api/getSubAndCamera',
//     method: 'get',
//     params: query
//   })
// }

export function getBoundCold(query) {
  return request({
    url: '/storage/api3/getSubAndCamera',
    method: 'post',
    data: query
  })
}
